package com.pkk.cloud.support.oauth2.config.integration;

import java.util.Map;
import lombok.Data;

/**
 * @author peikunkun<br>
 * @version V1.0<br>
 * @Title: 获取鉴权信息<br>
 * @Description: <><br>
 * @date 2020/3/18 0018 上午 11:54<br>
 * @URL:[]
 */
@Data
public class IntegrationAuthentication {

  //授权类型
  private String authType;
  //授权用户
  private String username;
  //授权参数
  private Map<String, String[]> authParameters;
  //授权客户端
  private String clientId;


  /**
   * @Description: 获取授权参数
   * @Param: paramter
   * @return: java.lang.String
   * @Author: peikunkun
   * @Date: 2020/3/18 0018 下午 12:01
   */
  public String getAuthParameter(String paramter) {
    String[] values = this.authParameters.get(paramter);
    if (values != null && values.length > 0) {
      return values[0];
    }
    return null;
  }
}
